package comp.wxapi.service;

import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.service.WxPayService;

import cn.binarywang.wx.miniapp.api.WxMaService;
import comp.wxapi.bean.BaseConfigBean;
import me.chanjar.weixin.mp.api.WxMpService;

public interface WxBaseService {
	/**
	 * 获取微信appid和appsecret等基础参数
	 * @return
	 */
	public BaseConfigBean getBaseConfig();
	
	public BaseConfigBean getBaseConfig(String key,String group);
	/**
	 * 获取支付基础参数
	 * @param isRefund
	 * @return
	 */
	public WxPayConfig getPayConfig(boolean isRefund);
	
	public WxPayConfig getPayConfig(boolean isRefund,String key,String group);
	/**
	 * 小程序WxMaService获取 cn.binarywang.wx.miniapp.api.WxMaService
	 * @return
	 */
	public WxMaService wxMaService(BaseConfigBean configBean);
	/**
	 * 公众号WxMpService获取 me.chanjar.weixin.mp.api.WxMpService
	 * @param isJsapi 是否是Jsapi,当为jsapi时，需要获取ticket传入
	 * @return
	 */
	public WxMpService wxMpService(BaseConfigBean baseConfigBean);
	
	public String getAccessToken(String appid);
	/**
	 * access_token获取
	 * @param appid
	 * @param appsecret
	 * @return
	 */
	public String getAccessToken(String appid,String appsecret);
	
	public WxPayService getWxpayService(WxPayConfig wxPayConfig);
	
	public String getHeader(String key);
}
